/*
 * HD44780_translate.c
 *
 * Created: 24.06.2013 15:28:01
 *  Author: saenko
 */ 
#include "HD44780_translate.h"

uint8_t lcd_trans (uint8_t data)
{
	switch(data)
	{
		case ' ': return 0b00100000; break;
		case '!': return 0b00100001; break;
		case '"': return 0b00100010; break;
		case '#': return 0b00100011; break;
		case '$': return 0b00100100; break;
		case '%': return 0b00100101; break;
		case '&': return 0b00100110; break;
		case '\'': return 0b00101011; break;
		case '(': return 0b00101000; break;
		case ')': return 0b00101001; break;
		case '*': return 0b00101010; break;
		case '+': return 0b00101011; break;
		case ',': return 0b00101100; break;
		case '-': return 0b00101101; break;
		case '.': return 0b00101110; break;
		case '/': return 0b00101111; break;
		case '0': return 0b00110000; break;
		case '1': return 0b00110001; break;
		case '2': return 0b00110010; break;
		case '3': return 0b00110011; break;
		case '4': return 0b00110100; break;
		case '5': return 0b00110101; break;
		case '6': return 0b00110110; break;
		case '7': return 0b00110111; break;
		case '8': return 0b00111000; break;
		case '9': return 0b00111001; break;
		case ':': return 0b00111010; break;
		case ';': return 0b00111011; break;
		case '<': return 0b00111100; break;
		case '=': return 0b00111101; break;
		case '>': return 0b00111110; break;
		case '?': return 0b00111111; break;
		case '@': return 0b01000000; break;
		case 'A': return 0b01000001; break;
		case 'B': return 0b01000010; break;
		case 'C': return 0b01000011; break;
		case 'D': return 0b01000100; break;
		case 'E': return 0b01000101; break;
		case 'F': return 0b01000110; break;
		case 'G': return 0b01000111; break;
		case 'H': return 0b01001000; break;
		case 'I': return 0b01001001; break;
		case 'J': return 0b01001010; break;
		case 'K': return 0b01001011; break;
		case 'L': return 0b01001100; break;
		case 'M': return 0b01001101; break;
		case 'N': return 0b01001110; break;
		case 'O': return 0b01001111; break;
		case 'P': return 0b01010000; break;
		case 'Q': return 0b01010001; break;
		case 'R': return 0b01010010; break;
		case 'S': return 0b01010011; break;
		case 'T': return 0b01010100; break;
		case 'U': return 0b01010101; break;
		case 'V': return 0b01010110; break;
		case 'W': return 0b01010111; break;
		case 'X': return 0b01011000; break;
		case 'Y': return 0b01011001; break;
		case 'Z': return 0b01011010; break;
		case '[': return 0b01011011; break;
		//case ' ': return 0b01011100; break;
		case ']': return 0b01011101; break;
		case '^': return 0b01011110; break;
		case '_': return 0b01011111; break;
		//case ' ': return 0b01100000; break;
		case 'a': return 0b01100001; break;
		case 'b': return 0b01100010; break;
		case 'c': return 0b01100011; break;
		case 'd': return 0b01100100; break;
		case 'e': return 0b01100101; break;
		case 'f': return 0b01100110; break;
		case 'g': return 0b01100111; break;
		case 'h': return 0b01101000; break;
		case 'i': return 0b01101001; break;
		case 'j': return 0b01101010; break;
		case 'k': return 0b01101011; break;
		case 'l': return 0b01101100; break;
		case 'm': return 0b01101101; break;
		case 'n': return 0b01101110; break;
		case 'o': return 0b01101111; break;
		case 'p': return 0b01110000; break;
		case 'q': return 0b01110001; break;
		case 'r': return 0b01110010; break;
		case 's': return 0b01110011; break;
		case 't': return 0b01110100; break;
		case 'u': return 0b01110101; break;
		case 'v': return 0b01110110; break;
		case 'w': return 0b01110111; break;
		case 'x': return 0b01111000; break;
		case 'y': return 0b01111001; break;
		case 'z': return 0b01111010; break;
		case '{': return 0b01111011; break;
		case '|': return 0b01111100; break;
		case '}': return 0b01111101; break;
		//case ' ': return 0b01111110; break;
		//case ' ': return 0b01111111; break;
	
	}
}